Skip to content

feat(designate): add full Designate metrics - #115

Merged
Mohammed Naser (mnaser) merged 2 commits into
mainfrom
feat/designate-up-metric
Dec 1, 2026
Merged

Mohammed Naser (mnaser) merged 2 commits into
mainfrom
feat/designate-up-metric

Conversation

@larainema

@larainema Dong Ma (larainema) commented Jul 8, 2026 •

Copy link
Copy Markdown
Member

Part of ENG-423.

Summary

Build on Dong Ma's original Designate registration and health metric in 3b52207. This extends the existing PR to restore all five upstream metric families with the same labels and status values:

  • openstack_designate_up
  • openstack_designate_zones
  • openstack_designate_zone_status
  • openstack_designate_recordsets
  • openstack_designate_recordsets_status

The collector uses the typed read-only queries and integration fixture from openstackdb v0.3.0. Zone and recordset labels use canonical UUIDs. The enabled queries share a read-only snapshot, and a failed scrape reports openstack_designate_up 0.

Set DESIGNATE_DATABASE_URL to enable collection. All five metrics are on by default. --designate.disable-recordsets-status or DESIGNATE_DISABLE_RECORDSETS_STATUS=true skips the per-recordset metric and its database query while preserving the other four.

Verification

  • Build, short race suite, integration-tagged compilation and vet, and go mod verify passed against the released dependency with GOWORK=off.
  • Read-only live scrapes against Designate 2025.1 returned all five metric families, 3 zones, and 15 recordsets with dashed IDs. The opt-out retained the counts and omitted the status family. An unreachable database produced _up=0.
  • Docker-backed integration coverage asserts all five metrics, the opt-out, and a database outage after a successful scrape. The local Docker daemon was unavailable, so those tests are left to CI.

Signed-off-by: Dong Ma <winterma.dong@gmail.com>
@fitbeard

Copy link
Copy Markdown
Contributor

Dong Ma (@larainema) what's the story behind this? Why only one(up) metric? Apart from that - lgtm.

@larainema

Copy link
Copy Markdown
Member Author

Dong Ma (Dong Ma (@larainema)) what's the story behind this? Why only one(up) metric? Apart from that - lgtm.

Tadas Sutkaitis (@fitbeard) The backstory is that this came from a customer report: they were relying on openstack_designate_up, which existed in the legacy openstack_exporter, and noticed it disappeared when moving to openstack_database_exporter.

Build on the existing Designate registration and use the read-only queries from openstackdb v0.3.0 for full upstream metric coverage. Allow operators to disable per-recordset status collection independently.

Signed-off-by: Tadas Sutkaitis <tadas.sutkaitis@vexxhost.com>
@fitbeard Tadas Sutkaitis (fitbeard) changed the title feat(designate): add Designate up metric feat(designate): add full Designate metrics Dec 1, 2026

@mnaser Mohammed Naser (mnaser) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against upstream openstack-exporter's designate.go and Designate's source. All five metrics match upstream names, labels and status values, recordset status follows Designate's RecordSet.status precedence, and the opt-out skips the per-recordset query entirely. Unit and integration tests pass. Thanks Dong for starting this and Tadas for finishing it.

@mnaser
Mohammed Naser (mnaser) merged commit 2db82f3 into main Dec 1, 2026
9 checks passed
@mnaser
Mohammed Naser (mnaser) deleted the feat/designate-up-metric branch December 1, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants